﻿SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON

GO


CREATE PROCEDURE [dbo].[bhp_temp_ModBlogSettingsStructure]
AS
BEGIN

	DECLARE
		@BlogPostsTabId	INT


	SELECT @BlogPostsTabId = id FROM n_Tree WHERE name = 'BLOG_POSTS'
		
	ALTER TABLE BLOG_POSTS
		ALTER COLUMN title NVARCHAR(400) NOT NULL
	ALTER TABLE BLOG_POSTS
		ALTER COLUMN url NVARCHAR(400) NULL

	UPDATE n_Tree SET dat = '[varchar](400)' WHERE name IN ('title', 'url') AND TYP = 'F' AND parent = @BlogPostsTabId
	
		
END
GO

EXEC [bhp_temp_ModBlogSettingsStructure]
GO

DROP PROCEDURE [bhp_temp_ModBlogSettingsStructure]